<admintpl file="header" />
</head>
<body class="J_scroll_ixed">
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('AppGroup/index')}">群列表</a></li>
			<li><a href="{:U('AppGroup/add')}">新增群</a></li>
			<li><a href="{:U('AppGroup/upload_pic')}">设置群背景音乐</a></li>
        </ul>
       
        <div class="container">
                <div class="panel-group" id="accordion">
                	 <form method="post" class="form-horizontal js-ajax-form" action="{:U('AppGroup/edit_post')}">
                  <div class="panel panel-default" style="margin-bottom: 20px;">
                    <div class="panel-heading">
                      <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion"  href="#collapseOne">群基本信息 </a>
                      </h4>
                     </div>
                    <div id="collapseOne" class="panel-collapse collapse in">
                      <div class="panel-body">  
                        <table class="table" id="table1">
                                <caption>群基本信息</caption>
                                      <tbody>
                                         <tr>
                                            <td width="8%">群互动id</td>
                                            <td width="32%"><input value="{$model.group_uniq_id}" name="group_uniq_id1" readonly  class="form-control input-sm" type="text"></td>
                                            <td width="10%"></td>
                                            <td width="8%">群容量</td>
                                            <td width="32%"><input value="{$model.maxusers}" class="form-control input-sm" type="text"></td>
                                            <td width="10%"></td>
                                         </tr>
                                         <tr>
                                            <td width="8%">群主互动id</td>
                                            <td width="32%"><input  value="{$model.user_uniq_id}" name="user_uniq_id" class="form-control input-sm" type="text"></td>
                                            <td width="10%"></td>

                                            <td width="8%">群名称</td>
                                            <td width="32%"><input  value="{$model.groupname}" class="form-control input-sm" type="text"></td>
                                            <td width="10%"></td>
                                         </tr>
                                          <tr>
                                            <td width="8%">群描述</td>
                                            <td width="32%"><input  value="{$model.descscription}" class="form-control input-sm" type="text"></td>
                                            <td width="10%"></td>
                                            <td width="8%">群公告</td>
                                            <td width="32%"><input  value="{$model.notice}" class="form-control input-sm" type="text"></td>
                                            <td width="10%"></td>
                                         </tr>

                                          <tr>
                                            <td width="8%">是否公开</td>
                                            <td width="32%">
                                            	<select class="select2-default" name="is_public">
													<option value="1" <if condition="$model['is_public'] eq 1">selected</if> >是</option>
													<option value="2" <if condition="$model['is_public'] eq 2">selected</if> >否</option>
												</select>
                                            </td>
                                            <td width="10%"></td>
                                            <td width="8%">允许成员邀请</td>
                                            <td width="32%">
                                            	<select class="select2-default" name="is_allowinvites">
													<option value="1" <if condition="$model['is_allowinvites'] eq 1">selected</if> >是</option>
													<option value="2" <if condition="$model['is_allowinvites'] eq 2">selected</if> >否</option>
												</select>
                                            </td>
                                            <td width="10%"></td>
                                         </tr>

                                        <tr>
                                            <td width="8%">是否禁言</td>
                                            <td width="32%">
                                            	<select class="select2-default" name="is_block">
													<option value="1" <if condition="$model['is_block'] eq 1">selected</if> >是</option>
													<option value="2" <if condition="$model['is_block'] eq 2">selected</if> >否</option>
												</select>
                                            </td>
                                            <td width="10%"></td>
                                            <td width="8%">是否推荐</td>
                                            <td width="32%">
                                            	<select class="select2-default" name="is_recommend">
													<option value="1" <if condition="$model['is_recommend'] eq 1">selected</if> >是</option>
													<option value="2" <if condition="$model['is_recommend'] eq 2">selected</if> >否</option>
												</select>
                                            </td>
                                            <td width="10%"></td>
                                         </tr>

                                         
										<input type="hidden" value="{$model.id}" name="id" />
                                         <tr>
                                            <td width="8%">环信id</td>
                                            <td width="32%"><input type="text"  value="{$model.huanxing_groupid}"></td>
                                            <td width="10%"></td>
                                            <td width="8%">更换群主</td>
                                            <td width="40%">
                                            	<select class="select2-default" name="owner_id1" style="width: 100%;">
													<foreach name="group_user_list" item="vo">
															<option value="{$vo.user_uniq_id}" <if condition="$vo[level] eq 1 ">selected</if> >互动id:{$vo.user_uniq_id}---昵称:{$vo.nick}</option>
													</foreach>
												</select>
                                            </td>
                                            <td width="10%"></td>
                                         </tr>
                                      </tbody>
                            </table>
                      </div>
                    </div>
                  </div>
                  <div class="form-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
				<a class="btn" href="{:U('AppGroup/index')}">返回</a>
			    </div>
					</form>

                  <div class="panel panel-default" style="margin-bottom: 20px;">
                    <div class="panel-heading">
                      <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">成员列表</a>             
                      </h4>
                    </div>
                    <div id="collapseTwo" class="panel-collapse collapse in">
                          <div class="panel-body">
                            <table class="table table-striped table-bordered table-hover table-condensed" id="table2">
                                <caption>成员列表</caption>
                                        <thead>
                                        	<th>序号</th>
                                        	<th>群成员互动id</th>
                                            <th>群成员昵称</th>
                                            <th>群成员性别</th>
                                            <th>群成员等级</th>
                                            <th>群成员余额</th>
                                            <th>群成员职位</th>
                                        </thead>
                                        <?php
                                            $count=0;
                                            $sex=array('1'=>'男','2'=>'女','3'=>'保密');
                                            $level=array('1'=>'群主','2'=>'副群主','3'=>'临时管理员','4'=>'普通成员');
                                        ?>
                                        <tbody>
                                         <foreach name='group_user_list' item='vo' key='key'>
                                            <?php
                                                $count=$count+1;
                                            ?>
                                            <tr>
                                            	<td>{$count}</td>
                                                <td>{$vo.user_uniq_id}</td>
                                                <td>{$vo.nick}</td>
                                                <td>{$sex[$vo['sex']]}</td>
                                                <td>{$vo.grade}</td>
                                                <td>{$vo.balance}</td>
                                                <td>{$level[$vo['level']]}</td>
                                            </tr>
                                         </foreach>
                                      </tbody>
                            </table>
                          </div>
                      </div>
                    </div>
                    
                  </div>
            </div>
            
        </div>
<script type="text/javascript">
  $(function(){
    $("input").attr('readonly',"readonly");
  });
</script>  
</body>
</html> 